import request from '@/utils/request';

// 查询收藏列表
export function listCollect(query) {
	return request({
		url: '/mall/collect/list',
		method: 'post',
		data: query,
	});
}

// 查询收藏详细
export function getCollect(id) {
	return request({
		url: '/mall/collect/getInfo',
		method: 'post',
		data: { id: id },
	});
}

// 新增收藏
export function addCollect(data) {
	return request({
		url: '/mall/collect/add',
		method: 'post',
		data: data,
	});
}

// 编辑收藏
export function updateCollect(data) {
	return request({
		url: '/mall/collect/edit',
		method: 'post',
		data: data,
	});
}

// 删除收藏
export function delCollect(id) {
	return request({
		url: '/mall/collect/remove',
		method: 'post',
		data: { id: id },
	});
}

// 导出收藏
export function exportCollect(query) {
	return request({
		url: '/mall/collect/export',
		method: 'post',
		params: query,
	});
}
